package com.android.projectsquirrel;

import java.util.ArrayList;
import java.util.List;

import android.app.*;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.database.Cursor;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.TimePicker;
import android.widget.Toast;

public class ProfileDetail extends Activity{
	String proName;
	
	
	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.profiledetails);
        Bundle extras = getIntent().getExtras();
        proName = extras.getString("profilename");
        populate();
        
        Button squirrelButton = (Button) findViewById(R.id.home);
     	squirrelButton.setOnClickListener(new View.OnClickListener() {
             public void onClick(View view) {
             	Intent myIntent = new Intent(view.getContext(),Main.class);
                 startActivity(myIntent);
             }
     	});
        
	}
	
	public void populate(){
		DBAdapter_Survey2 dba = new DBAdapter_Survey2(this);
		dba.open();
		setContentView(R.layout.profiledetails);
		Cursor c = dba.getTitle2(proName);
    	startManagingCursor(c);
    	if(c.moveToFirst()){
//    		TextView textProfile = (TextView)findViewById(R.id.p);
//    		textProfile.setText(c.getString(0));
    	}
		
	}
	

}
